<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>缴费管理</title>
	<link rel="stylesheet" href="../css/common2.css">

	<style>
		.add {
			width: 150px;
			background-size: 150px 35px;
		}

		.two {
			width: calc((92% - 120px)/5);
		}

		.three {
			width: 120px !important;
		}

		.two .photo {
			width: 50px;
			height: 50px;
		}

		.search_img {
			position: absolute;
			margin-top: 1px;
			right: 3%;
		}

		td>div {
			white-space: pre-wrap;
			padding-left: 5px;
		}
	</style>
</head>

<body>
	<div id="vue-root" style="margin-top: 30px;">
		<div class="add">
			<a href="finance_pay_item.html" style="color: white">添加缴费项目</a>
		</div>

		<!-- <input class="search" placeholder="请输入项目名称"> -->
		<div class="refresh" onclick="location.reload()">刷新</div>

		<img src="../image/search.png" height="35" width="35" class="search_img">
		<div class="table">
			<table class="table_top">
				<thead>
					<tr>
						<th class="one">
							<input type="checkbox" class="check-box" v-model="all">项目编号
						</th>
						<th>名称</th>
						<th>价格</th>
						<th>可缴费时间</th>
						<th>描述</th>
						<th>当面付</th>
						<th>编辑/删除</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(item,index) in list" :key="item.id">
						<td class="two">
							<input type="checkbox" class="check-box" v-model="item.checked">
							<span v-text="index+1"></span>
						</td>
						<td v-text="item.name"></td>
						<td>￥<span v-text="item.fee/100"></span></td>
						<td v-text="item.startTime+' - '+item.endTime"></td>
						<td v-text="item.remark"></td>
						<td>
							<a :href="'finance_micropay.html?id='+item.id">
								<button>当面付</button>
							</a>
						</td>
						<td style="border-left: none; margin-top: 1px;">
							<div class="option">
								<div class="edit-icon option-icon" style="position: absolute; left: 20%; top: 30%;"
									@click="edit(item.id)">
									<img class="img" src="../image/edit.png" height="20" width="20"
										onmouseover="this.src='../image/edit_light.png'"
										onmouseout="this.src='../image/edit.png'" />
								</div>
								<div class="delete-icon option-icon" style="right: 20%; top:30%;position: absolute;"
									@click="del([item.id])">
									<img class="img" src="../image/delete.png" height="20" width="20"
										onmouseover="this.src='../image/delete_light.png'"
										onmouseout="this.src='../image/delete.png'" />
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<br>
		<div class="delete" @click="batchDelete" v-if="total>1">批量删除</div>

		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>

	</div>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/scriptZIP/dayjs.min.js"></script>

	<script src="/scriptZIP/dayjs.min.js"></script>


	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>

	<script>

		var app = new Vue(merge({
			data: {
				urls: {
					list: '/pc/charge/list/' + top_params().id,
					del: '/pc/charge/del'
				},
			},
			methods: {
				edit: function (id) {
					location.href = "finance_pay_item.html?id=" + id;
				}
			}
		}));
	</script>


</body>

</html>